/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package object;

import database.MTDatabase;
import java.util.HashMap;
import server.MTServer;

/**
 *
 * @author daolam
 */
interface Callback  
{  
    public void onLoadData(HashMap<Short,String> data);  
}  

public abstract class MTObject implements Callback{
    protected long _guid;
    
    protected MTServer _server;
    protected MTDatabase _dbHandler;
    
    public MTObject()
    {
        initialize();
    }
    
    public void initialize()
    {
        _dbHandler = _server.getDBHandler();
    }
    
    public abstract void newData();
    public abstract void saveData();
    public abstract void loadData(); 

    @Override
    public void onLoadData(HashMap<Short,String> data) {
        throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
    }
}
